* ======================================
* --- Attitudes to immigrants Survey ---
* ======================================


	use $dta\SurveyAttitudes.dta, clear
	
	gen Lscore = partyAttitudes if partyBloc == "Left"
	gen Rscore = partyAttitudes if partyBloc == "Right"
	
	gen party = ""
	replace party = "Red" if party_loc == "rodt"
	replace party = "Socialist Left"  if party_loc == "sv"
	replace party = "Labour"  if party_loc == "a"
	replace party = "Centre" if party_loc == "sp"
	replace party = "Christian Dem." if party_loc == "krf"
	replace party = "Liberal" if party_loc == "v"
	replace party = "Conservative"  if party_loc == "h"
	replace party = "Progress"  if party_loc == "frp"
	replace party = "Green" if party_loc == "mdg"

	graph bar Lscore Rscore, horizontal ///
		over(party, descending sort(partyAttitudes) lab(angle(45))) ///
		bar(1, fcol(white) lcol(black*2)) ///
		bar(2, fcol(gs6) lcol(black*2)) ///
		nofill scheme(plotplain) ///
		ytitle("Should participate more" "(fraction agreeing)") ///
		ylab(0(0.2)1) ///
		legend(pos(6) lab(1 "Left bloc") lab(2 "Right bloc") row(1)) ///
		name(bar, replace)
		
		
	twoway (scatter partyImmigrants Lscore, ///
		msymbol(O) mfcol(white) mlabel(party) msize(medlarge) ///
		mlcol(black) mlabpos(9)) ///
		(scatter partyImmigrants Rscore, ///
		msymbol(O) mfcol(gs8) mlabel(party) msize(medlarge) ///
		mlcol(gs2) mlabpos(9)), ///
		xlab(0(0.2)1) ///
		xtitle("Should participate more" "(fraction agreeing)") ///
		ytitle("Immigrant share") ///
		scheme(plotplain) ///
		legend(pos(6) lab(1 "Left bloc") lab(2 "Right bloc") row(1)) ///
		name(scatter, replace)

	graph combine bar scatter, scheme(plotplain)
	graph export $figs/SurveyImmigrants.pdf, replace